package com.yc.music.controller.Api.common;

import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yc.music.common.context.YcContext;
import com.yc.music.service.service23.MusicianService231;

/**
 * 更多音乐人
 * ClassName: IndexController <br/>
 * Function: TODO ADD FUNCTION. <br/>
 * Reason: TODO ADD REASON(可选). <br/>
 * date: 2016年11月21日  <br/>
 *
 * @author qinhaiguan
 * @version
 */
@Controller
@RequestMapping("/common/musicians")
public class MusiciansController231 {

	private static Logger logger = Logger.getLogger(MusiciansController231.class);
	
	@Autowired
	private MusicianService231 musicianService231;
	
	
	@ResponseBody
	@RequestMapping(value="/more/v231", method = RequestMethod.GET, produces = "application/json")
	public Map<String,Object> getindex231(@RequestParam(value="page",required=false) Integer page) {
		logger.info("获取更多的音乐人列表接收客户端参数：page="+page);
		Map<String,Object> resultMap  = new HashMap<String,Object>();
		try {
			resultMap = musicianService231.getMoreMusicianList(page, resultMap);
		} catch (Exception e) {
			resultMap.put(YcContext.CODE, 500);
			resultMap.put(YcContext.MESSAGE, YcContext.SYS_ERROR_MSG);
			resultMap.put(YcContext.DATA,YcContext.EMPTY_STRING);
			logger.error(e);
		}
		return resultMap;
	}
	
}
